﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;

namespace YellowMap
{
    public class SettingViewModel: BaseViewModel
    {

        int m_GPS;

        public int GPS
        {
            get
            {
                m_GPS = (int)Setting.Get("GPS");
                return m_GPS;
            }
            set
            {
                m_GPS = value;
                Setting.Set("GPS", value);
                NotifyPropertyChanged("GPS");
            }
        }

        string _ServiceItem;

        public string ServiceItem
        {
            get
            {
                _ServiceItem = (string)Setting.Get("ServiceItem");
                return _ServiceItem;
            }
            set
            {
                _ServiceItem = value;
                Setting.Set("ServiceItem", value);
                NotifyPropertyChanged("ServiceItem");
            }
        }
        string _FoodItem;

        public string FoodItem
        {
            get
            {
                _FoodItem = (string)Setting.Get("FoodItem");
                return _FoodItem;
            }
            set
            {
                _FoodItem = value;
                Setting.Set("FoodItem", value);
                NotifyPropertyChanged("FoodItem");
            }
        }
        string _TravelItem;
        public string TravelItem
        {
            get
            {
                _TravelItem = (string)Setting.Get("TravelItem");
                return _TravelItem;
            }
            set
            {
                _TravelItem = value;
                Setting.Set("TravelItem", value);
                NotifyPropertyChanged("TravelItem");
            }
        }
        string _EntertainmentItem;
        public string EntertainmentItem
        {
            get
            {
                _EntertainmentItem = (string)Setting.Get("EntertainmentItem");
                return _EntertainmentItem;
            }
            set
            {
                _EntertainmentItem = value;
                Setting.Set("EntertainmentItem", value);
                NotifyPropertyChanged("EntertainmentItem");
            }
        }
        string _EducationItem;
        public string EducationItem
        {
            get
            {
                _EducationItem = (string)Setting.Get("EducationItem");
                return _EducationItem;
            }
            set
            {
                _EducationItem = value;
                Setting.Set("EducationItem", value);
                NotifyPropertyChanged("EducationItem");
            }
        }
        string _ShoppingItem;
        public string ShoppingItem
        {
            get
            {
                _ShoppingItem = (string)Setting.Get("ShoppingItem");
                return _ShoppingItem;
            }
            set
            {
                _ShoppingItem = value;
                Setting.Set("ShoppingItem", value);
                NotifyPropertyChanged("ShoppingItem");
            }
        }
        Color _BGColor_Setting;

        public Color BGColor_Setting
        {
            get
            {
                _BGColor_Setting = (Color)Setting.Get("BGColor_Setting");
                return _BGColor_Setting;
            }
            set
            {
                _BGColor_Setting = value;
                Setting.Set("BGColor_Setting", value);
                NotifyPropertyChanged("BGColor_Setting");
            }
        }

        Color _BGColor_screen;
        public Color BGColor_screen
        {
            get
            {
                _BGColor_screen = (Color)Setting.Get("BGColor_screen");
                return _BGColor_screen;
            }
            set
            {
                _BGColor_screen = value;
                Setting.Set("BGColor_screen", value);
                NotifyPropertyChanged("BGColor_screen");
            }
        }

        Color _BGColor_Appbar;
        public Color BGColor_Appbar
        {
            get
            {
                _BGColor_Appbar = (Color)Setting.Get("BGColor_Appbar");
                return _BGColor_Appbar;
            }
            set
            {
                _BGColor_Appbar = value;
                Setting.Set("BGColor_Appbar", value);
                NotifyPropertyChanged("BGColor_Appbar");
            }
        }

        Color _BGColor_Title;
        public Color BGColor_Title
        {
            get
            {
                _BGColor_Title = (Color)Setting.Get("BGColor_Title");
                return _BGColor_Title;
            }
            set
            {
                _BGColor_Title = value;
                Setting.Set("BGColor_Title", value);
                NotifyPropertyChanged("BGColor_Title");
            }
        }

        Color _BGColor_Text;
        public Color BGColor_Text
        {
            get
            {
                _BGColor_Text = (Color)Setting.Get("BGColor_Text");
                return _BGColor_Text;
            }
            set
            {
                _BGColor_Text = value;
                Setting.Set("BGColor_Text", value);
                NotifyPropertyChanged("BGColor_Text");
            }
        }

        Color _BGColor_titBG;
        public Color BGColor_titBG
        {
            get
            {
                _BGColor_titBG = (Color)Setting.Get("BGColor_titBG");
                return _BGColor_titBG;
            }
            set
            {
                _BGColor_titBG = value;
                Setting.Set("BGColor_titBG", value);
                NotifyPropertyChanged("BGColor_titBG");
            }
        }

        int _indexSubCateFoodDink = 0 ;
        public int indexSubCateFoodDink
        {
            get
            {
                _indexSubCateFoodDink = (int)Setting.Get("indexSubCateFoodDink");
                return _indexSubCateFoodDink;
            }
            set
            {
                _indexSubCateFoodDink = value;
                Setting.Set("indexSubCateFoodDink", value);
                NotifyPropertyChanged("indexSubCateFoodDink");
            }
        }
        int _indexSubTravel = 0;
        public int indexSubTravel
        {
            get
            {
                _indexSubTravel = (int)Setting.Get("indexSubTravel");
                return _indexSubTravel;
            }
            set
            {
                _indexSubTravel = value;
                Setting.Set("indexSubTravel", value);
                NotifyPropertyChanged("indexSubTravel");
            }
        }
        int _indexSubEntertainment = 0;
        public int indexSubEntertainment
        {
            get
            {
                _indexSubEntertainment = (int)Setting.Get("indexSubEntertainment");
                return _indexSubEntertainment;
            }
            set
            {
                _indexSubEntertainment = value;
                Setting.Set("indexSubEntertainment", value);
                NotifyPropertyChanged("indexSubEntertainment");
            }
        }
        int _indexSubEducation = 0;
        public int indexSubEducation
        {
            get
            {
                _indexSubEducation = (int)Setting.Get("indexSubEducation");
                return _indexSubEducation;
            }
            set
            {
                _indexSubEducation = value;
                Setting.Set("indexSubEducation", value);
                NotifyPropertyChanged("indexSubEducation");
            }
        }
        int _indexSubShopping = 0;
        public int indexSubShopping
        {
            get
            {
                _indexSubShopping = (int)Setting.Get("indexSubShopping");
                return _indexSubShopping;
            }
            set
            {
                _indexSubShopping = value;
                Setting.Set("indexSubShopping", value);
                NotifyPropertyChanged("indexSubShopping");
            }
        }
        int _indexSubService = 0;
        public int indexSubService
        {
            get
            {
                _indexSubService = (int)Setting.Get("indexSubService");
                return _indexSubService;
            }
            set
            {
                _indexSubService = value;
                Setting.Set("indexSubService", value);
                NotifyPropertyChanged("indexSubService");
            }
        }


        int _indexCate;

        public int IndexCate
        {
            get {
                _indexCate = (int)Setting.Get("IndexCate");
                return _indexCate; }
            set { 
                _indexCate = value;
                Setting.Set("IndexCate", value);
                NotifyPropertyChanged("IndexCate");
                }
        }

        string _subCate;
        public string SubCate {
            get {
                _subCate = Setting.Get("SubCate").ToString();
                return _subCate;
            }
            set {
                _subCate = value;
                Setting.Set("SubCate", value);
                NotifyPropertyChanged("SubCate");
            }
        }

        string _cate;
        public string Category
        {
            get
            {
                _cate = Setting.Get("Category").ToString();
                return _cate;
            }
            set
            {
                _cate = value;
                Setting.Set("Category", value);
                NotifyPropertyChanged("Category");
            }
        }

        int _mapType;
        public int MapType
        {
            get {
                _mapType = (int)Setting.Get("MapType");
                return _mapType;
            }
            set {
                _mapType = value;
                Setting.Set("MapType", value);
                NotifyPropertyChanged("MapType");
            }
        }

        int _searchBy;
        public int SearchBy
        {
            get
            {
                _searchBy = (int)Setting.Get("SearchBy");
                return _searchBy;
            }
            set
            {
                _searchBy = value;
                Setting.Set("SearchBy", value);
                NotifyPropertyChanged("SearchBy");
            }
        }

        int _searchFrom;
        public int SearchFrom
        {
            get
            {
                _searchFrom = (int)Setting.Get("SearchFrom");
                return _searchFrom;
            }
            set
            {
                _searchFrom = value;
                Setting.Set("SearchFrom", value);
                NotifyPropertyChanged("SearchFrom");
            }
        }

        double _lat;
        public double UserLocationLattitude
        {
            get
            {
                _lat = double.Parse(Setting.Get("UserLocationLattitude").ToString());
                return _lat;
            }
            set
            {
                _lat = value;
                Setting.Set("UserLocationLattitude", value);
                NotifyPropertyChanged("UserLocationLattitude");
            }
        }

        double _lng;
        public double UserLocationLongitude
        {
            get
            {
                _lng = double.Parse(Setting.Get("UserLocationLongitude").ToString());
                return _lng;
            }
            set
            {
                _lng = value;
                Setting.Set("UserLocationLongitude", value);
                NotifyPropertyChanged("UserLocationLongitude");
            }
        }

        double _latmap;
        public double MapLattitude
        {
            get
            {
                _latmap = double.Parse(Setting.Get("MapLattitude").ToString());
                return _latmap;
            }
            set
            {
                _latmap = value;
                Setting.Set("MapLattitude", value);
                NotifyPropertyChanged("MapLattitude");
            }
        }

        double _lngmap;
        public double MapLongitude
        {
            get
            {
                _lngmap = double.Parse(Setting.Get("MapLongitude").ToString());
                return _lngmap;
            }
            set
            {
                _lngmap = value;
                Setting.Set("MapLongitude", value);
                NotifyPropertyChanged("MapLongitude");
            }
        }
        string _language;

        public string Language
        {
            get {
                _language = (string)Setting.Get("Language");
                return _language; }

            set { 
                _language = value;
                Setting.Set("Language", value);
                NotifyPropertyChanged("Language");
            }
        }
        Favorite _SelectedFavorite;

        public Favorite SelectedFavorite
        {
            get {
                _SelectedFavorite = (Favorite)Setting.Get("SelectedFavorites");
                return _SelectedFavorite; }

            set { _SelectedFavorite = value;
            Setting.Set("SelectedFavorites", value);
            NotifyPropertyChanged("SelectedFavorites");
            }
        }
        History _SelectedHistory;

        public History SelectedHistory
        {
            get
            {
                _SelectedHistory = (History)Setting.Get("SelectedHistory");
                return _SelectedHistory;
            }

            set
            {
                _SelectedHistory = value;
                Setting.Set("SelectedHistory", value);
                NotifyPropertyChanged("SelectedHistory");
            }
        }
        
    }


}
